---
archived: true
title: Mil Edit
date: 2014-02-12
#description: Markdown list editor with a responsive feel.
description: Markdown List Editor
extended_description: Markdown List Editor
status: 'experimental'
category: web
sort_index: 0
links:
    'Source' :
        '1' : http://github.com/mil/mil-edit
        '2' : http://github.com/mil/mil-edit-2
    'Demo' :
        '1' : http://userbound.com/interfaces/Mil-Edit/1
        '2' : http://userbound.com/interfaces/Mil-Edit/2
footnotes:
    - 'In <code>mil-edit</code>, you edit one line at a time. The line your editing shows markdown attributes like, **star bolding** _underline italicizing_ and converts it styled after you navigate to a different line.'
    - 'My markdown library, dubbed <code>mil-markdown</code>, cut dependencies on 2 markdown libraries from the original <code>mil-edit</code>, by soley handling the import and exporting of a single markdown list.'
    - 'This a painful mistake in application development and one I had to learn the hard way.'
    - 'Ask me to show you a demo of my failed startup which wraps <a href="https://github.com/mil/Mmvp.js/">Mmvp.js</a> and my <a href="https://github.com/mil/mil-edit-2">Mil Edit 2</a> abondware!'
---
[Mil Edit](http://github.com/mil/mil-edit) is a small javascript markdown _list editor_ which supports basic text attributes (**bold**, _italic_), has undo/redo capabilities, and drag-and-drop.

The story goes that after realizing that most browser-based markdown editors are document editors, and not _list_ editors, I set out to make my own browser-based markdown _list_ editor!  I decided my editor would exclusively operate on a single markdown list and support text attributes in hackerish-style<sup>1</sup>. 

Here's a demo of `mil-edit` embedded so you can get a feel for how it operates:


<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/lib/zepto.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/lib/zepto.fx.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/lib/underscore.min.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/history.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/globals.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/util.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/mil_edit.template.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/mil_markdown.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/tree.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/interface.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/state.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/user_actions.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/keybindings.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/event_handlers.js"></script>
<script type="text/javascript" src="/assets/prj_demo/mil_edit/js/app/app.js"></script>
<script>
window.onload = function() {
mil_edit.initialize();
mil_edit.load_markdown([
"- **Mil Edit** does things like:",
"  * Indentation and Undentation",
"  * **Bold** and _Italic_",
"  * Undo and redo",
"- Also: it supports _drag and drop_!",
"  * **But** it's a little _buggy_ :9",
"  * It was a learning project"
].join("\n"));
}
</script>

<link type="text/css" rel="stylesheet" property="stylesheet" href="/assets/prj_demo/mil_edit/css/style.css">

<div class='interface-demo'><div id="editor"></div></div>

The [first version](https://github.com/mil/mil-edit) of `mil-edit` I implemented as a very simple 500-some-line [javascript singleton](https://github.com/mil/mil-edit/blob/master/js/mil_edit.js) which featured simple importing and exporting of a single markdown list using its `load` and `dump` functions.  However, I quickly became un-satisfied with the un-maintainable and monolithic architecture of `mil-edit`.

As such, I set out to make `mil-edit-2`. The driving force behind it's development was a cleaner internal architecture.  I separated out functionality into [small modules](https://github.com/mil/mil-edit-2/tree/master/js/app), wrote my own [markdown library](https://github.com/mil/mil-edit-2/blob/master/js/app/mil_markdown.js)<sup>2</sup>, and cleaned up the source a lot. Additionally, I added undo/redo and drag-and-drop capabilities to the feature set.


<div class='captioned-image'>
<img src="/assets/prj_img/mil_edit/featured-in-linux-pro-mag.jpg" alt="Mil Edit featured in Linux Pro Magazine">
<span class='caption'>Mil Edit was featured in <i>Linux Pro Magazine</i>'s May 2013 issue! That was several months after it's conception and release.</span> 
</div>


Unfortunately, regardless of the modularity I worked into `mil-edit-2`, my architecture was flawed. I wrote [tests](https://github.com/mil/mil-edit-2/tree/master/spec) _after_ the fact<sup>3</sup> and eventually the startup which was the driving force behind the development of `mil-edit` failed<sup>4</sup>.

If I were to continue on `mil-edit` nowawadays, I would like to re-implement, start from scratch, writing [browserify](http://browserify.org/) modules and embrace TDD from day one. Oh yeah, I'd put focus on mobile-first.

